
package org.dromara.system.api.feign;

/**
 * @author: zhou shuai
 * @date: 2024/10/5 17:10
 * @version: v1
 */

import org.dromara.common.core.domain.R;
import org.dromara.system.api.domain.vo.RemoteDeptVo;
import org.dromara.system.api.feign.fallback.SystemDeptFallBack;
import org.dromara.system.api.feign.fallback.SystemPostFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

import static org.dromara.common.core.constant.ServerNameConstants.SYSTEM_SERVER_NAME;

@FeignClient(contextId = "system-post-api", name = SYSTEM_SERVER_NAME, fallbackFactory = SystemPostFallBack.class)
public interface SystemPostClient {

    /**
     * 根据岗位 ID 列表查询岗位名称映射关系
     *
     * @param postIds 岗位 ID 列表
     * @return Map，其中 key 为岗位 ID，value 为对应的岗位名称
     */
    @GetMapping(value = "/api/system/post/postName/byPostIds")
    R<Map<Long, String>> selectPostNamesByIds(@RequestParam("postIds") List<Long> postIds);

}
